<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Application_Controllers_Buyer_ActionLoginBuyer
{   public $wrongMessage="wooii";
  
    public function preLogin($form){
        //echo "aaaa";
        $buyer =  new Application_Model_DbTable_Buyers();
        $username=$form->getValue('username');
        $password=$form->getValue('password');
        if($buyer->checkLogin($username, $password)){
            return true;
        }else{
            $this->wrongMessage="wrong username or password";
            return false;
        }
    }
    public function onLogin(){

    }
}
?>
